package com.powersystem.demo.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.powersystem.demo.entity.PsInspectiontaskMain;
import com.powersystem.demo.mapper.PsInspectiontaskMainMapper;
import com.powersystem.demo.service.IPsInspectiontaskMainService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author linrongji
 * @since 2019-11-14
 */
@Service
public class PsInspectiontaskMainServiceImpl extends ServiceImpl<PsInspectiontaskMainMapper, PsInspectiontaskMain> implements IPsInspectiontaskMainService {
    @Autowired
    private PsInspectiontaskMainMapper PsInspectiontaskMainMapper;

    public IPage<PsInspectiontaskMain> selectPageVo(String lineCode, int isStart, int page){
        Page<PsInspectiontaskMain> pages = new Page<>(page, 5);
        return  PsInspectiontaskMainMapper.selectPage(pages, new QueryWrapper<PsInspectiontaskMain>()
                .like("lineCode", lineCode).like("isStart", isStart));
    }
}
